import java.math.BigDecimal;

// 用户类
public class User {
    private String username; // 用户名

    private double balance; // 用户钱包的余额
    private BigDecimal balance2;

    public User() {
    }

    public User(String username, double balance) {
        this.username = username;
        this.balance = balance;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", balance=" + balance +
                '}';
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public void addMoney(Double money) {
        this.balance += money;
    }
}
